package com.youdian.fragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by moker on 2017/12/14.
 */

public class PagerAdapter extends FragmentPagerAdapter {

    private List<Fragment> mFragments;


    public PagerAdapter(FragmentManager fm,List<Fragment> fragments){
        super(fm);
        this.mFragments = fragments;

    }

    @Override
    public int getCount() {
        return mFragments.size();
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

}
